package com.hksj.Intelligentmanagement.auth.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 角色表
 * @author chenxingqing
 */
@Data
@ApiModel(value="Role对象", description="角色表")
public class RoleDTO{

    @ApiModelProperty(value = "主键id")
    @NotBlank(message = "角色id不能为空", groups =  {RoleDTO.Update.class})
    private String id;

    @ApiModelProperty(value = "角色名")
    @NotBlank(message = "角色名不能为空", groups =  {RoleDTO.Create.class})
    private String name;

    @ApiModelProperty(value = "角色权限字符串")
    @NotBlank(message = "角色权限字符串不能为空", groups =  {RoleDTO.Create.class})
    private String roleKey;

    @ApiModelProperty(value = "角色状态（0正常 1停用）")
    @NotBlank(message = "角色状态不能为空", groups =  {RoleDTO.Create.class})
    private String status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "类型 0 = 系统类型（不可删除） 1 = 用户类型（可删除）")
    @NotNull(message = "类型不能为空", groups =  {RoleDTO.Create.class})
    private Integer type;

    @ApiModelProperty(value = "角色 权限关联关系集合")
    private List<RoleMenuDTO> roleMenus;

    /**
     * 保存的时候校验分组
     */
    public interface Create{

    }

    public interface Update{

    }
}
